package com.excemly.library.repository;

import com.excemly.library.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface UserRepository extends JpaRepository<User, Long> {
    // 添加缺失的查询方法
    boolean existsByUsername(String username);
    User findByUsername(String username);
    Page<User> findByUsernameContainingOrEmailContaining(String username, String email, Pageable pageable);
}
//用户数据访问接口，继承 JpaRepository ，提供 findByUsernameAndPassword 方法。